<?php
$tdatastyles=array();
	$tdatastyles[".NumberOfChars"]=80; 
	$tdatastyles[".ShortName"]="styles";
	$tdatastyles[".OwnerID"]="";
	$tdatastyles[".OriginalTable"]="styles";


	
//	field labels
$fieldLabelsstyles = array();
if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsstyles["English"]=array();
	$fieldToolTipsstyles["English"]=array();
	$fieldLabelsstyles["English"]["id"] = "Id";
	$fieldToolTipsstyles["English"]["id"] = "";
	$fieldLabelsstyles["English"]["style_code"] = "Style Code";
	$fieldToolTipsstyles["English"]["style_code"] = "";
	$fieldLabelsstyles["English"]["style_name"] = "Style Name";
	$fieldToolTipsstyles["English"]["style_name"] = "";
	$fieldLabelsstyles["English"][""] = "";
	$fieldToolTipsstyles["English"][""] = "";
	$fieldLabelsstyles["English"][""] = "Styles";
	$fieldToolTipsstyles["English"][""] = "";
	if (count($fieldToolTipsstyles["English"])){
		$tdatastyles[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="Chinese (Hong Kong S.A.R.)")
{
	$fieldLabelsstyles["Chinese (Hong Kong S.A.R.)"]=array();
	$fieldToolTipsstyles["Chinese (Hong Kong S.A.R.)"]=array();
	$fieldLabelsstyles["Chinese (Hong Kong S.A.R.)"]["id"] = "Id";
	$fieldToolTipsstyles["Chinese (Hong Kong S.A.R.)"]["id"] = "";
	$fieldLabelsstyles["Chinese (Hong Kong S.A.R.)"]["style_code"] = "Style Code";
	$fieldToolTipsstyles["Chinese (Hong Kong S.A.R.)"]["style_code"] = "";
	$fieldLabelsstyles["Chinese (Hong Kong S.A.R.)"]["style_name"] = "Style Name";
	$fieldToolTipsstyles["Chinese (Hong Kong S.A.R.)"]["style_name"] = "";
	$fieldLabelsstyles["Chinese (Hong Kong S.A.R.)"][""] = "";
	$fieldToolTipsstyles["Chinese (Hong Kong S.A.R.)"][""] = "";
	$fieldLabelsstyles["Chinese (Hong Kong S.A.R.)"][""] = "Styles";
	$fieldToolTipsstyles["Chinese (Hong Kong S.A.R.)"][""] = "";
	if (count($fieldToolTipsstyles["Chinese (Hong Kong S.A.R.)"])){
		$tdatastyles[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="Chinese (Taiwan)")
{
	$fieldLabelsstyles["Chinese (Taiwan)"]=array();
	$fieldToolTipsstyles["Chinese (Taiwan)"]=array();
	$fieldLabelsstyles["Chinese (Taiwan)"]["id"] = "Id";
	$fieldToolTipsstyles["Chinese (Taiwan)"]["id"] = "";
	$fieldLabelsstyles["Chinese (Taiwan)"]["style_code"] = "Style Code";
	$fieldToolTipsstyles["Chinese (Taiwan)"]["style_code"] = "";
	$fieldLabelsstyles["Chinese (Taiwan)"]["style_name"] = "Style Name";
	$fieldToolTipsstyles["Chinese (Taiwan)"]["style_name"] = "";
	$fieldLabelsstyles["Chinese (Taiwan)"][""] = "";
	$fieldToolTipsstyles["Chinese (Taiwan)"][""] = "";
	$fieldLabelsstyles["Chinese (Taiwan)"][""] = "Styles";
	$fieldToolTipsstyles["Chinese (Taiwan)"][""] = "";
	if (count($fieldToolTipsstyles["Chinese (Taiwan)"])){
		$tdatastyles[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="French")
{
	$fieldLabelsstyles["French"]=array();
	$fieldToolTipsstyles["French"]=array();
	if (count($fieldToolTipsstyles["French"])){
		$tdatastyles[".isUseToolTips"]=true;
	}
}


	
	$tdatastyles[".NCSearch"]=true;

	

$tdatastyles[".shortTableName"] = "styles";
$tdatastyles[".nSecOptions"] = 0;
$tdatastyles[".recsPerRowList"] = 1;	
$tdatastyles[".tableGroupBy"] = "0";
$tdatastyles[".mainTableOwnerID"] = "";
$tdatastyles[".moveNext"] = 1;




$tdatastyles[".showAddInPopup"] = false;

$tdatastyles[".showEditInPopup"] = false;

$tdatastyles[".showViewInPopup"] = false;


$tdatastyles[".fieldsForRegister"] = array();

$tdatastyles[".listAjax"] = false;

	$tdatastyles[".audit"] = false;

	$tdatastyles[".locking"] = false;
	
$tdatastyles[".listIcons"] = true;
$tdatastyles[".edit"] = true;
$tdatastyles[".inlineEdit"] = true;
$tdatastyles[".view"] = true;

$tdatastyles[".exportTo"] = true;

$tdatastyles[".printFriendly"] = true;

$tdatastyles[".delete"] = true;

$tdatastyles[".showSimpleSearchOptions"] = false;

$tdatastyles[".showSearchPanel"] = true;


$tdatastyles[".isUseAjaxSuggest"] = true;

$tdatastyles[".rowHighlite"] = true;


// button handlers file names

$tdatastyles[".addPageEvents"] = false;

$tdatastyles[".arrKeyFields"][] = "id";

// use datepicker for search panel
$tdatastyles[".isUseCalendarForSearch"] = false;

// use timepicker for search panel
$tdatastyles[".isUseTimeForSearch"] = false;

$tdatastyles[".isUseiBox"] = false;


$tdatastyles[".useDetailsPreview"] = true;	

$tdatastyles[".isUseInlineAdd"] = true;

$tdatastyles[".isUseInlineEdit"] = true;
$tdatastyles[".isUseInlineJs"] = $tdatastyles[".isUseInlineAdd"] || $tdatastyles[".isUseInlineEdit"];

$tdatastyles[".allSearchFields"] = array();

$tdatastyles[".globSearchFields"][] = "id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("id", $tdatastyles[".allSearchFields"]))
{
	$tdatastyles[".allSearchFields"][] = "id";	
}
$tdatastyles[".globSearchFields"][] = "style_code";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("style_code", $tdatastyles[".allSearchFields"]))
{
	$tdatastyles[".allSearchFields"][] = "style_code";	
}
$tdatastyles[".globSearchFields"][] = "style_name";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("style_name", $tdatastyles[".allSearchFields"]))
{
	$tdatastyles[".allSearchFields"][] = "style_name";	
}


$tdatastyles[".googleLikeFields"][] = "id";
$tdatastyles[".googleLikeFields"][] = "style_code";
$tdatastyles[".googleLikeFields"][] = "style_name";



$tdatastyles[".advSearchFields"][] = "id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("id", $tdatastyles[".allSearchFields"])) 
{
	$tdatastyles[".allSearchFields"][] = "id";	
}
$tdatastyles[".advSearchFields"][] = "style_code";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("style_code", $tdatastyles[".allSearchFields"])) 
{
	$tdatastyles[".allSearchFields"][] = "style_code";	
}
$tdatastyles[".advSearchFields"][] = "style_name";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("style_name", $tdatastyles[".allSearchFields"])) 
{
	$tdatastyles[".allSearchFields"][] = "style_name";	
}

$tdatastyles[".isTableType"] = "list";


	

$tdatastyles[".isDisplayLoading"] = true;

$tdatastyles[".isResizeColumns"] = false;

	$tdatastyles[".subQueriesSupAccess"] = true;




$tdatastyles[".pageSize"] = 20;

$gstrOrderBy = "";
if(strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy,0,8))!="order by")
	$gstrOrderBy = "order by ".$gstrOrderBy;
$tdatastyles[".strOrderBy"] = $gstrOrderBy;
	
$tdatastyles[".orderindexes"] = array();

$tdatastyles[".sqlHead"] = "SELECT id,   style_code,   style_name";
$tdatastyles[".sqlFrom"] = "FROM styles";
$tdatastyles[".sqlWhereExpr"] = "";
$tdatastyles[".sqlTail"] = "";




//fill array of records per page for list and report without group fields
$arrRPP = array();
$arrRPP[] = 10;
$arrRPP[] = 20;
$arrRPP[] = 30;
$arrRPP[] = 50;
$arrRPP[] = 100;
$arrRPP[] = 500;
$arrRPP[] = -1;
$tdatastyles[".arrRecsPerPage"] = $arrRPP;

//fill array of groups per page for report with group fields
$arrGPP = array();
$arrGPP[] = 1;
$arrGPP[] = 3;
$arrGPP[] = 5;
$arrGPP[] = 10;
$arrGPP[] = 50;
$arrGPP[] = 100;
$arrGPP[] = -1;
$tdatastyles[".arrGroupsPerPage"] = $arrGPP;

	$tableKeys = array();
	$tableKeys[] = "id";
	$tdatastyles[".Keys"] = $tableKeys;

//	id
	$fdata = array();
	$fdata["strName"] = "id";
	$fdata["ownerTable"] = "styles";
		$fdata["Label"]="Id"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		$fdata["AutoInc"]=true;
	
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "id";
	
		$fdata["FullName"]= "id";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 1;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatastyles["id"]=$fdata;
//	style_code
	$fdata = array();
	$fdata["strName"] = "style_code";
	$fdata["ownerTable"] = "styles";
		$fdata["Label"]="Style Code"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "style_code";
	
		$fdata["FullName"]= "style_code";
	
		
		
		
		
		
				$fdata["Index"]= 2;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=50";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatastyles["style_code"]=$fdata;
//	style_name
	$fdata = array();
	$fdata["strName"] = "style_name";
	$fdata["ownerTable"] = "styles";
		$fdata["Label"]="Style Name"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "style_name";
	
		$fdata["FullName"]= "style_name";
	
		
		
		
		
		
				$fdata["Index"]= 3;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=255";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatastyles["style_name"]=$fdata;

	
$tables_data["styles"]=&$tdatastyles;
$field_labels["styles"] = &$fieldLabelsstyles;
$fieldToolTips["styles"] = &$fieldToolTipsstyles;

// -----------------start  prepare master-details data arrays ------------------------------//
// tables which are detail tables for current table (master)
$detailsTablesData["styles"] = array();
$dIndex = 1-1;
			$strOriginalDetailsTable="sales_order_items";
	$detailsTablesData["styles"][$dIndex] = array(
		  "dDataSourceTable"=>"sales_order_items"
		, "dOriginalTable"=>$strOriginalDetailsTable
		, "dShortTable"=>"sales_order_items"
		, "masterKeys"=>array()
		, "detailKeys"=>array()
		, "dispChildCount"=> "1"
		, "hideChild"=>"0"
		, "sqlHead"=>"SELECT id,   sales_order_id,   item_no,   product_id,   property_id,   size_system_id,   unit_price,   total_quantity,   size_breakup_id,   delivery_date,   status"	
		, "sqlFrom"=>"FROM sales_order_items"	
		, "sqlWhere"=>""
		, "sqlTail"=>""
		, "groupBy"=>"0"
		, "previewOnList" => 1
		, "previewOnAdd" => 1
		, "previewOnEdit" => 1
		, "previewOnView" => 1
	);	
		$detailsTablesData["styles"][$dIndex]["masterKeys"][]="id";
		$detailsTablesData["styles"][$dIndex]["detailKeys"][]="property_id";


	
// tables which are master tables for current table (detail)
$masterTablesData["styles"] = array();

// -----------------end  prepare master-details data arrays ------------------------------//

require_once(getabspath("classes/sql.php"));










$proto261=array();
$proto261["m_strHead"] = "SELECT";
$proto261["m_strFieldList"] = "id,   style_code,   style_name";
$proto261["m_strFrom"] = "FROM styles";
$proto261["m_strWhere"] = "";
$proto261["m_strOrderBy"] = "";
$proto261["m_strTail"] = "";
$proto262=array();
$proto262["m_sql"] = "";
$proto262["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto262["m_column"]=$obj;
$proto262["m_contained"] = array();
$proto262["m_strCase"] = "";
$proto262["m_havingmode"] = "0";
$proto262["m_inBrackets"] = "0";
$proto262["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto262);

$proto261["m_where"] = $obj;
$proto264=array();
$proto264["m_sql"] = "";
$proto264["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto264["m_column"]=$obj;
$proto264["m_contained"] = array();
$proto264["m_strCase"] = "";
$proto264["m_havingmode"] = "0";
$proto264["m_inBrackets"] = "0";
$proto264["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto264);

$proto261["m_having"] = $obj;
$proto261["m_fieldlist"] = array();
						$proto266=array();
			$obj = new SQLField(array(
	"m_strName" => "id",
	"m_strTable" => "styles"
));

$proto266["m_expr"]=$obj;
$proto266["m_alias"] = "";
$obj = new SQLFieldListItem($proto266);

$proto261["m_fieldlist"][]=$obj;
						$proto268=array();
			$obj = new SQLField(array(
	"m_strName" => "style_code",
	"m_strTable" => "styles"
));

$proto268["m_expr"]=$obj;
$proto268["m_alias"] = "";
$obj = new SQLFieldListItem($proto268);

$proto261["m_fieldlist"][]=$obj;
						$proto270=array();
			$obj = new SQLField(array(
	"m_strName" => "style_name",
	"m_strTable" => "styles"
));

$proto270["m_expr"]=$obj;
$proto270["m_alias"] = "";
$obj = new SQLFieldListItem($proto270);

$proto261["m_fieldlist"][]=$obj;
$proto261["m_fromlist"] = array();
												$proto272=array();
$proto272["m_link"] = "SQLL_MAIN";
			$proto273=array();
$proto273["m_strName"] = "styles";
$proto273["m_columns"] = array();
$proto273["m_columns"][] = "id";
$proto273["m_columns"][] = "style_code";
$proto273["m_columns"][] = "style_name";
$obj = new SQLTable($proto273);

$proto272["m_table"] = $obj;
$proto272["m_alias"] = "";
$proto274=array();
$proto274["m_sql"] = "";
$proto274["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto274["m_column"]=$obj;
$proto274["m_contained"] = array();
$proto274["m_strCase"] = "";
$proto274["m_havingmode"] = "0";
$proto274["m_inBrackets"] = "0";
$proto274["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto274);

$proto272["m_joinon"] = $obj;
$obj = new SQLFromListItem($proto272);

$proto261["m_fromlist"][]=$obj;
$proto261["m_groupby"] = array();
$proto261["m_orderby"] = array();
$obj = new SQLQuery($proto261);

$queryData_styles = $obj;
$tdatastyles[".sqlquery"] = $queryData_styles;

$tableEvents["styles"] = new eventsBase;

?>
